package com.sample.dubbo.demo.dto;

import java.io.Serializable;

public class Customer implements Serializable {
    private static final long serialVersionUID = -8292558570298797592L;
    private Long id;
    private String code;
    private String name;
    private String address;
    private String phone;
    private String email;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public static Customer createById(long id) {
        Customer customer = new Customer();
        customer.setId(id);
        customer.setCode("customer" + id);
        customer.setName("客户" + id);
        customer.setPhone(String.valueOf(13601101234L + id));
        customer.setEmail(customer.getCode() + "@demo.com");
        return customer;
    }
}
